package com.lwf.thymeleafdemo1.thmeleaf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/hello")
public class ThymeleafHelloWrodController {
    @RequestMapping("/thymeleaf")
    public String helloThymeleaf(Model model){
        model.addAttribute("hello","hello Thymeleaf！");
        return "hello/index";
    }

    @RequestMapping("/test")
    public String hello(Model model) {
        model.addAttribute("message", "Hello, Thymeleaf调试111!");
        return "hello";
    }
}